var strUrl = contextPath + "/user/";
/**
 * 选择人员
 */
function selectUser(objName, objId) {
	var option = "center:yes;dialogWidth:550px;dialogHeight:500px";
	var url = strUrl + "selectUser.shtml";
	var person = showModalDialog(url, window, option);
	var userCode = "";
	var userName = "";
	if (person != null) {
		userCode = person.username;
		if (jQuery('#' + objName).length > 0) {
			userName = userName + person.name;
			if (jQuery('#' + objName).is('input')) {
				jQuery('#' + objName).val(userName);
			} else if (jQuery('#' + objName).is('span')) {
				jQuery('#' + objName).html(userName);
			}
		}
		jQuery('input[name="' + objId + '"]').val(userCode);
	}

}

function getUserCode() {
	var option = "center:yes;dialogWidth:550px;dialogHeight:500px";
	var url = strUrl + "selectUser.shtml";
	var person = showModalDialog(url, window, option);
	var userCode = "";
	if (person != null) {
		userCode = person.username;
	}
	return userCode;
}